/*
 * @Description: In User Settings Edit
 * @Author: your name
 * @Date: 2019-10-15 09:36:58
 * @LastEditTime: 2019-10-17 23:00:04
 * @LastEditors: Please set LastEditors
 */
import Vue from 'vue'
import Router from 'vue-router'
// import Login from '@/views/login'
// import Container from '@/container/container'
// import Dashboard from '@/views/dashboard'
// import Article from '@/views/article'
// import Address from '@/views/address'
// 异步加载组件
const Login = () =>
    import ('@/views/login')
const Container = () =>
    import ('@/container/container')
const Dashboard = () =>
    import ('@/views/dashboard')
const Article = () =>
    import ('@/views/article')
const Address = () =>
    import ('@/views/address')



Vue.use(Router)

export default new Router({
    routes: [{
            path: '/Login',
            name: 'Login',
            component: Login
        },

        {
            path: '/',
            redirect: '/dashboard',
            name: 'Container',
            component: Container,
            children: [{
                    path: 'dashboard',
                    name: '首页',
                    component: Dashboard,
                    children: [
                        { path: 'dashboard1', name: '首页1', component: Dashboard, },
                        {
                            path: 'dashboard2',
                            name: '首页2',
                            component: Dashboard,
                            children: [
                                { path: 'dashboard21', name: '首页21', component: Dashboard, },
                                { path: 'dashboard22', name: '首页22', component: Dashboard, },
                            ]
                        },
                    ]
                },
                { path: 'article', name: '文章', component: Article, },
                { path: 'Address', name: '通讯录', component: Address, },
            ]
        },

    ]
})